package com.cash.app.manager.api

import com.cash.app.constant.AppConstant.API_ACCOUNT_DETAIL
import com.cash.app.constant.AppConstant.API_ADD_SHARE
import com.cash.app.constant.AppConstant.API_APP_START
import com.cash.app.constant.AppConstant.API_FAST_APPLY
import com.cash.app.constant.AppConstant.API_GET_CHANNEL
import com.cash.app.constant.AppConstant.API_GET_META_DATA
import com.cash.app.constant.AppConstant.API_GLOBAL_CONFIG
import com.cash.app.constant.AppConstant.API_LOAN_LIST
import com.cash.app.constant.AppConstant.API_MOVE_THIRD
import com.cash.app.constant.AppConstant.API_QUIT
import com.cash.app.constant.AppConstant.API_SHOW_REAL_PRODUCT
import com.cash.app.constant.AppConstant.API_TEMP_TOKEN
import com.cash.app.constant.AppConstant.API_TO_REPAY
import com.cash.app.constant.AppConstant.API_UPLOAD_HARDWARE
import com.cash.app.constant.AppConstant.API_VIP_PRODUCT
import com.cash.app.manager.model.AccountDetailResponse
import com.cash.app.manager.model.AppStartRequest
import com.cash.app.manager.model.FastApplyResponse
import com.cash.app.manager.model.GetChannelRequest
import com.cash.app.manager.model.GetChannelResponse
import com.cash.app.manager.model.GetTokenRequest
import com.cash.app.manager.model.GetTokenResponse
import com.cash.app.manager.model.GlobalConfigResponse
import com.cash.app.manager.model.LoanDataResponse
import com.cash.app.manager.model.LoanListRequest
import com.cash.app.manager.model.OrderIdRequest
import com.cash.app.manager.model.ProductIdRequest
import com.cash.app.manager.model.QuitResponse
import com.cash.app.manager.model.RealProductResponse
import com.cash.app.manager.model.RepayResponse
import com.cash.app.manager.model.ShareAppRequest
import com.cash.app.manager.model.ShareMessageRequest
import com.cash.app.manager.model.VipProductResponse
import com.cash.app.net.BaseResponse
import com.cash.app.ui.auth.model.MetaRsp
import com.cash.app.utils.extra.model.ExtraHardwareRequest
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.POST

interface GlobalAPIService {

    @POST(API_TEMP_TOKEN)
    suspend fun getToken(@Body token: GetTokenRequest): Response<BaseResponse<GetTokenResponse>>

    @POST(API_GET_CHANNEL)
    suspend fun getChannel(@Body request: GetChannelRequest): Response<BaseResponse<GetChannelResponse>>

    @POST(API_APP_START)
    suspend fun appStart(@Body request: AppStartRequest): Response<BaseResponse<Unit>>

    @POST(API_GLOBAL_CONFIG)
    suspend fun getGlobalConfig(): Response<BaseResponse<GlobalConfigResponse>>

    @POST(API_ACCOUNT_DETAIL)
    suspend fun getAccountDetail(): Response<BaseResponse<AccountDetailResponse>>

    @POST(API_LOAN_LIST)
    suspend fun getLoanList(@Body request: LoanListRequest): Response<BaseResponse<LoanDataResponse>>

    @POST(API_TO_REPAY)
    suspend fun getRepayUrl(@Body request: OrderIdRequest): Response<BaseResponse<RepayResponse>>

    @POST(API_SHOW_REAL_PRODUCT)
    suspend fun showRealProduct(@Body request: ProductIdRequest): Response<BaseResponse<RealProductResponse>>

    @POST(API_FAST_APPLY)
    suspend fun fastApply(@Body request: ProductIdRequest): Response<BaseResponse<FastApplyResponse>>

    @POST(API_VIP_PRODUCT)
    suspend fun getVipProduct(): Response<BaseResponse<VipProductResponse>>

    @POST(API_QUIT)
    suspend fun appQuit(): Response<BaseResponse<QuitResponse>>

    @POST(API_ADD_SHARE)
    suspend fun uploadShareAppList(@Body request: ShareAppRequest): Response<BaseResponse<Unit>>

    @POST(API_MOVE_THIRD)
    suspend fun uploadMessageList(@Body request: ShareMessageRequest): Response<BaseResponse<Unit>>

    @POST(API_UPLOAD_HARDWARE)
    suspend fun uploadExtraHardware(@Body request: ExtraHardwareRequest): Response<BaseResponse<Unit>>

    @POST(API_GET_META_DATA)
    suspend fun getMetaData(): Response<BaseResponse<MetaRsp>>
}